home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Development / RxMUI / Install < prev    next >
Encoding:
Text File  |  2004-01-31  |  12.3 KB  |  310 lines

  1. ; $VER: RxMUI_Install 31.6 (23.1.2003)
  2.  
  3. (procedure P_SetMessages
  4.  
  5.     (if (= "italiano" @language)
  6.         (
  7.             (set #WhatInstallPromptMsg          "Cosa vuoi installare?")
  8.             (set #WhatInstallHelpMsg            "Scegli cosa vuoi installare:\nLibrerie - tutte le librerie di RxMUI\nClassi MUI - alcune classi MUI\nUtilità - alcuni programmi d'utilità\nDoc. RxMUI - la documentazione di RxMUI in formato HTML\nUtility guide - la documentazione delle utility in formato AmigaGuide\nEsempi - macro d'esempio")
  9.  
  10.             (set #WhatInstallLibrariesMsg       "Librerie")
  11.             (set #WhatInstallMCCsMsg            "Classi MUI")
  12.             (set #WhatInstallUtilitiesMsg       "Utilità")
  13.             (set #WhatInstallRxMUIDocsMsg       "Documentazione RxMUI")
  14.             (set #WhatInstallGuideMsg           "Documentazione utilità")
  15.             (set #WhatInstallExamplesMsg        "Esempi")
  16.  
  17.             (set #AskLibsDirPromptMsg           "Scegli la directory dove installare le librerie ARexx")
  18.             (set #AskLibsDirHelpMsg             "Nella directory che sceglierai verranno copiate varie librerie ARexx e verrà creata una directory chiamata RxMUI, contenente le classi esterne. Ovviamente la directory scelta deve essere nell'assegnamento logico LIBS:.")
  19.  
  20.             (set #AskNLibsDirPromptMsg          "Scegli la directory dove installare le librerie non ARexx")
  21.             (set #AskNLibsDirHelpMsg            "Nella directory che sceglierai verranno copiate varie librerie non ARexx. Ovviamente la directory scelta deve essere nell'assegnamento logico LIBS:.")
  22.  
  23.             (set #AskMCCsDirPromptMsg           "Scegli la directory dove installare le classi MUI")
  24.             (set #AskMCCsDirHelpMsg             "Nella directory che sceglierai verranno copiate alcune classi MUI.")
  25.  
  26.             (set #AskUtilitisDirPromptMsg       "Scegli la directory dove installare alcuni programmi d'utilità")
  27.             (set #AskUtilitiesDirHelpMsg        "Nella directory che sceglierai verranno copiati alcuni programmi d'utilità, come rxs o rxhelp. Il posto migliore dove metterli è C:.")
  28.  
  29.             (set #AskRxMUIDocsDirPromptMsg      "Scegli la directory dove installare la documentazione di RxMUI")
  30.             (set #AskRxMUIDocsDirHelpMsg        "Nella directory che sceglierai verrà creato un cassetto di nome RxMUI ove sarà copiata la documentazione di RxMUI in formato HTML.")
  31.  
  32.             (set #AskGuideDirPromptMsg          "Scegli la directory dove installare la documentazione riguardante i programmi d'utilità")
  33.             (set #AskGuideDocsDirHelpMsg        "Nella directory che sceglierai verrà copiata la documentazione riguardante i programmi d'utilità in formato AmigaGuide.")
  34.  
  35.             (set #AskExamplesDirPromptMsg       "Scegli la directory dove installare alcune macro d'esempio di RxMUI")
  36.             (set #AskExamplesDirHelpMsg         "Nella directory che sceglierai verranno copiate alcune macro d'esempio di RxMUI.")
  37.  
  38.             (set #CopyingLibsMsg                "Sto copiando od aggiornando le librerie ARexx...")
  39.             (set #CopyingNLibsMsg               "Sto copiando od aggiornando le librerie non ARexx...")
  40.             (set #CopyingMCCsMsg                "Sto copiando od aggiornando le classi MUI...")
  41.             (set #CopyingUtilitiesMsg           "Sto copiando od aggiornando programmi di utilità...")
  42.             (set #CopyingRxMUIDocsMsg           "Sto copiando la documentazione di RxMUI...")
  43.             (set #CopyingGuideMsg               "Sto copiando la documentazione delle utility...")
  44.             (set #CopyingExamplesMsg            "Sto copiando gli esempi...")
  45.         )
  46.         (
  47.             (set #WhatInstallPromptMsg          "What do you want to install?")
  48.             (set #WhatInstallHelpMsg            "Choose what you want to install:\nLibraries - all the libraries needed by RxMUI to work\nMUI classes - some MUI custom classes\nUtilities - some little utilities progs\nRxMUI docs - RxMUI documentation in HTML format\nUtilities guides - Utilities guides in AmigaGuide format \nExamples - RxMUI ARexx macros")
  49.  
  50.             (set #WhatInstallLibrariesMsg       "Libraries")
  51.             (set #WhatInstallMCCsMsg            "MUI classes")
  52.             (set #WhatInstallUtilitiesMsg       "Utilities")
  53.             (set #WhatInstallRxMUIDocsMsg       "RxMUI documentation")
  54.             (set #WhatInstallGuideMsg           "Utilities guides")
  55.             (set #WhatInstallExamplesMsg        "Examples")
  56.  
  57.             (set #AskLibsDirPromptMsg           "Select the drawer where you want to copy ARexx libraries and RxMUI external classes")
  58.             (set #AskLibsDirHelpMsg             "In the drawer you supply here there will be installed ARexx libraries and there will be created a drawer called RxMUI, where external RxMUI classes reside. This drawer MUST BE in your LIBS: assignment.")
  59.  
  60.             (set #AskNLibsDirPromptMsg          "Select the drawer where you want to copy non ARexx libraries")
  61.             (set #AskNLibsDirHelpMsg            "In the drawer you supply here there will be installed non ARexx libraries. This drawer MUST BE in your LIBS: assignment.")
  62.  
  63.             (set #AskMCCsDirPromptMsg           "Select the drawer where you want to copy MUI classes")
  64.             (set #AskMCCsDirHelpMsg             "In the drawer you supply here there will be installed MUI classes.")
  65.  
  66.             (set #AskUtilitisDirPromptMsg       "Select the drawer where you want to install some utilities")
  67.             (set #AskUtilitiesDirHelpMsg        "In the drawer you supply here there will be installed some utilities such as rxs, needed to launch macro from inetd and rxhelp, needed to obtain functions inline help. The best drawer to place them is C:.")
  68.  
  69.             (set #AskRxMUIDocsDirPromptMsg      "Select the drawer where you want to install RxMUI documentation in HTML format")
  70.             (set #AskRxMUIDocsDirHelpMsg        "In the drawer you supply here there will be created a drawer called RxMUI where the RxMUI documentation in HTML format will be copied.")
  71.  
  72.             (set #AskGuideDirPromptMsg          "Select the drawer where you want to install utilities documentation")
  73.             (set #AskGuideDocsDirHelpMsg        "In the drawer you supply here there will be copied the utilities documentation in AmigaGuide format.")
  74.  
  75.             (set #AskExamplesDirPromptMsg       "Select the drawer where you want to install RxMUI examples macro")
  76.             (set #AskExamplesDirHelpMsg         "In the drawer you supply here there will be installed some RxMUI examples ARexx macros.")
  77.  
  78.             (set #CopyingLibsMsg                "Copying or updating ARexx libraries...")
  79.             (set #CopyingNLibsMsg               "Copying or updating non ARexx libraries...")
  80.             (set #CopyingMCCsMsg                "Copying or updating MUI classes...")
  81.             (set #CopyingUtilitiesMsg           "Copying or updating utilities...")
  82.             (set #CopyingRxMUIDocsMsg           "Copying RxMUI documentation...")
  83.             (set #CopyingGuideMsg               "Copying utilities documentation...")
  84.             (set #CopyingExamplesMsg            "Copying examples...")
  85.         )
  86.     )
  87. )
  88.  
  89. (procedure P_ChooseWhatIstall
  90.     (set #WhatInstall
  91.         (askoptions (prompt #WhatInstallPromptMsg)
  92.                     (help #WhatInstallHelpMsg)
  93.                     (choices #WhatInstallLibrariesMsg #WhatInstallMCCsMsg #WhatInstallUtilitiesMsg #WhatInstallRxMUIDocsMsg  #WhatInstallGuideMsg  #WhatInstallExamplesMsg)
  94.         )
  95.     )
  96. )
  97.  
  98. (procedure P_AskLibsDir
  99.     (set #libsDir
  100.         (askdir
  101.             (prompt #AskLibsDirPromptMsg)
  102.             (help #AskLibsDirHelpMsg)
  103.             (default "LIBS:")
  104.         )
  105.     )
  106.  
  107.     (set #nlibsDir
  108.         (askdir
  109.             (prompt #AskNLibsDirPromptMsg)
  110.             (help #AskNLibsDirHelpMsg)
  111.             (default "LIBS:")
  112.         )
  113.     )
  114. )
  115.  
  116. (procedure P_AskMCCsDir
  117.     (set #MCCsDir
  118.         (askdir
  119.             (prompt #AskMCCsDirPromptMsg)
  120.             (help #AskMCCsDirHelpMsg)
  121.             (default "MUI:LIBS/MUI/")
  122.         )
  123.     )
  124. )
  125.  
  126. (procedure P_AskUtilitiesDir
  127.     (set #UtilitiesDir
  128.         (askdir
  129.             (prompt #AskUtilitisDirPromptMsg)
  130.             (help #AskUtilitiesDirHelpMsg)
  131.             (default "C:")
  132.         )
  133.     )
  134. )
  135.  
  136. (procedure P_AskDocsDir
  137.     (set #RxMUIDocDir
  138.         (askdir
  139.            (prompt #AskRxMUIDocsDirPromptMsg)
  140.            (help #AskRxMUIDocsDirHelpMsg)
  141.            (default "Ram:")
  142.         )
  143.     )
  144. )
  145.  
  146. (procedure P_AskGuideDir
  147.     (set #guideDir
  148.         (askdir
  149.            (prompt #AskGuideDirPromptMsg)
  150.            (help #AskGuideDocsDirHelpMsg)
  151.            (default "Ram:")
  152.         )
  153.     )
  154. )
  155.  
  156. (procedure P_AskExamplesDir
  157.     (set #examplesDir
  158.         (askdir
  159.             (prompt #AskExamplesDirPromptMsg)
  160.             (help #AskExamplesDirHelpMsg)
  161.             (default "Ram:")
  162.         )
  163.     )
  164. )
  165.  
  166. (procedure P_CopyLibs
  167.     (working #CopyingLibsMsg)
  168.     (set #localLibsDir (tackon #source-dir "LIBS/"))
  169.     (foreach #localLibsDir "#?"
  170.         (copylib
  171.             (source (tackon #localLibsDir @each-name))
  172.             (dest #libsDir)
  173.         )
  174.     )
  175.  
  176.     (set #localRxmecLibsDir (tackon #source-dir "LIBS/RxMUI/"))
  177.     (set #installRxmecLibsDir (tackon #libsDir "RxMUI/"))
  178.     (if (= (exists #installRxmecLibsDir) 0)
  179.         (makedir #installRxmecLibsDir)
  180.     )
  181.     (foreach #localRxmecLibsDir "#?"
  182.         (copylib
  183.             (source (tackon #localRxmecLibsDir @each-name))
  184.             (dest #installRxmecLibsDir) (optional "nofail")
  185.         )
  186.     )
  187.  
  188.     (working #CopyingNLibsMsg)
  189.     (set #localNLibsDir (tackon #source-dir "NLIBS/"))
  190.     (foreach #localNLibsDir "#?"
  191.         (copylib
  192.             (source (tackon #localNLibsDir @each-name))
  193.             (dest #nlibsDir) (optional "nofail")
  194.         )
  195.     )
  196. )
  197.  
  198. (procedure P_CopyMCCs
  199.     (working #CopyingMCCsMsg)
  200.     (set #localMCCSDir (tackon #source-dir "MUI/"))
  201.     (foreach #localMCCsDir "#?"
  202.         (copylib
  203.             (source (tackon #localMCCsDir @each-name))
  204.             (dest #MCCsDir)
  205.         )
  206.     )
  207. )
  208.  
  209. (procedure P_CopyUtilities
  210.     (working #CopyingUtilitiesMsg)
  211.     (set #localUtilitiesDir (tackon #source-dir "C/"))
  212.     (foreach #localUtilitiesDir "#?"
  213.         (copylib
  214.             (source (tackon #localUtilitiesDir @each-name))
  215.             (dest #UtilitiesDir)
  216.         )
  217.     )
  218. )
  219.  
  220. (procedure P_CopyRxMUIDocs
  221.     (working #CopyingRxMUIDocsMsg)
  222.     (set #docsDir (tackon #source-dir (tackon "DOCS" @language)))
  223.     (if (= (exists #docsDir) 0)
  224.         (set #docsDir (tackon #source-dir "DOCS/english"))
  225.     )
  226.     (copyfiles
  227.         (source #docsDir)
  228.         (dest #RxMUIDocDir)
  229.         (optional nofail)
  230.         (pattern "RxMUI#?")
  231.     )
  232. )
  233.  
  234. (procedure P_CopyGuide
  235.     (working #CopyingGuideMsg)
  236.     (set #docsDir (tackon #source-dir (tackon (tackon "DOCS" @language) "Docs")))
  237.     (if (= (exists #docsDir) 0)
  238.         (set #docsDir (tackon #source-dir "DOCS/english/Docs"))
  239.     )
  240.     (copyfiles
  241.         (source #docsDir)
  242.         (dest #guideDir)
  243.         (optional nofail)
  244.         (pattern "~(#?(changes|thanks)#?)")
  245.     )
  246. )
  247.  
  248. (procedure P_CopyExamples
  249.     (working #CopyingExamplesMsg)
  250.     (copyfiles
  251.         (source (tackon #source-dir "EXAMPLES/"))
  252.         (dest #examplesDir)
  253.         (optional force askuser)
  254.         (all)
  255.     )
  256. )
  257.  
  258. (procedure P_CopyCatalogs
  259.     (set #catSourceDir (tackon "Catalogs" @language))
  260.     (set #catDestDir (tackon "Locale:" (tackon "Catalogs" @language)))
  261.     (if (= (and (= (exists (#catSourceDir)) 2) (= (exists (#catDestDir)) 2)) 1)
  262.         (foreach #catSourceDir "#?"
  263.             (copylib
  264.                 (source (tackon #catSourceDir @each-name))
  265.                 (dest #catDestDir)
  266.             )
  267.         )
  268.     )
  269. )
  270.  
  271. (set @default-dest "LIBS:")
  272. ;(set #source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon)) (expandpath @icon)))
  273.  
  274. (P_SetMessages)
  275.  
  276. (complete 0)
  277.  
  278. (P_ChooseWhatIstall)
  279.  
  280. (if (= 0 #WhatInstall) (exit))
  281. (if (BITAND #WhatInstall  1)  (P_AskLibsDir))
  282. (if (BITAND #WhatInstall  2)  (P_AskMCCsDir))
  283. (if (BITAND #WhatInstall  4)  (P_AskUtilitiesDir))
  284. (if (BITAND #WhatInstall  8)  (P_AskDocsDir))
  285. (if (BITAND #WhatInstall 16)  (P_AskGuideDir))
  286. (if (BITAND #WhatInstall 32)  (P_AskExamplesDir))
  287.  
  288. (if (BITAND #WhatInstall  1)
  289.     (
  290.         (P_CopyLibs)
  291.         (P_CopyCatalogs)
  292.     )
  293. )
  294. (complete 30)
  295.  
  296. (if (BITAND #WhatInstall  2)  (P_CopyMCCs))
  297. (complete 35)
  298.  
  299. (if (BITAND #WhatInstall  4)  (P_CopyUtilities))
  300. (complete 40)
  301.  
  302. (if (BITAND #WhatInstall  8)  (P_CopyRxMUIDocs))
  303. (complete 50)
  304.  
  305. (if (BITAND #WhatInstall 16)  (P_CopyGuide))
  306. (complete 80)
  307.  
  308. (if (BITAND #WhatInstall 32)  (P_CopyExamples))
  309. (complete 100)
  310.